//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/3/8
************************************************************/
    
//二维数组指针传参的应用

#include <stdio.h>

void print(int (*arr)[5], int c, int r)
{
    int i = 0;
    for(i = 0; i < c; i++)
    {
        int j = 0;
        for(j = 0; j < r; j++)
            {
            printf("%d ",*(*(arr+i)+j));
            }
            printf("\n");
    }
}

int main()
{
    int arr[3][5] = {{1,2,3,4,5},{2,3,4,5,6},{3,4,5,6,7}};
    print(arr,3,5);
    
    return 0;
}

